﻿using NUnit.Framework;
using System.Collections.Generic;
using OpenSda.Agilcont.Common.Data.Contracts;
using OpenSda.Agilcont.Common.Data.Entities;
using System.Linq;
namespace OpenSda.Agilcont.Common.Data.NhContexts.NuTest
{

    [TestFixture]
    public class ModuleAccessDataTest : AbstractBaseDataTests
    {
        private IModuleAccessData target;
        private IUserData userData;

        // These properties will be injected based on type
        public IModuleAccessData ModuleAccessData { set { target = value; } }
        public IUserData UserData { set { userData = value; } }


        [Test]
        public void SaveTest()
        {
            ModuleAccess moduleAccess = this.Save();
            Assert.IsNotNull(moduleAccess.Identity);
        }

        private ModuleAccess Save()
        {
            //User u = userData.GetAll()[0];

            return target.Save(new ModuleAccess()
            {
                Module = "aba",
                //UserId = u
                //InitialDate = new DateTime(1977, 01, 12)
                //FinalDate = new DateTime(1978, 01, 12)
                //CreationDate = new DateTime(1976, 01, 12)

            });
        }

    }
}
    


        /*
        [Test]
        public void EmpresaDaoSeclectTests()
        {
            Empresa e = target.Select("");
            Assert.IsNotNull(e);
        }

        [Test]
        public void EmpresaDaListAllTests()
        {
            var e = target.GetAll();

            Assert.IsNotNull(e);
        }

        [Test]
        public void EmpresaDeleteTests()
        {
            Empresa e = target.Select("");
            target.Delete(e);
        }

    }
}
        */